package com.pitop.sync.entity;

import java.io.Serializable;

public enum SyncNewDataEventState implements Serializable {

    Update("更新"),
    Insert("插入"),
    Delete("删除"),;

    public String val;

    SyncNewDataEventState(String val) {
        this.val = val;
    }

    /**
     * 根据事件名称查询
     *
     * @param eventName
     * @return
     */
    public static SyncNewDataEventState getEnum(String eventName) {
        for (SyncNewDataEventState syncNewDataEventState : SyncNewDataEventState.values()) {
            if (syncNewDataEventState.name().equalsIgnoreCase(eventName)) {
                return syncNewDataEventState;
            }
        }
        return null;
    }

    @Override
    public String toString() {
        return this.name();
    }
}
